/**
* @author:kellen
* @contact:xiekellen@hotmail.com
* @company:achivo-gz
* @created on:
* @modified on:
*/

package com.sasis.service.impl;

import java.util.List;

import com.sasis.service.impl.BaseManager;
import com.sasis.model.VipInfo;
import com.sasis.dao.VipInfoDao;
import com.sasis.service.VipInfoManager;

import com.sasis.util.PageList;
import com.sasis.util.PageRequest;

public class VipInfoManagerImpl extends BaseManager implements VipInfoManager {
    private VipInfoDao dao;

    /**
     * Set the Dao for communication with the data layer.
     * @param dao
     */
    public void setVipInfoDao(VipInfoDao dao) {
        this.dao = dao;
    }

    /**
     * @see com.sasis.service.VipInfoManager#getVipInfos(com.sasis.model.VipInfo)
     */
    public List getVipInfos(final VipInfo vipInfo) {
        return dao.getVipInfos(vipInfo);
    }

    /**
     * @see com.sasis.service.VipInfoManager#getVipInfo(String id)
     */
    public VipInfo getVipInfo(final String id) {
        return dao.getVipInfo(new Integer(id));
    }

    /**
     * @see com.sasis.service.VipInfoManager#saveVipInfo(VipInfo vipInfo)
     */
    public void saveVipInfo(VipInfo vipInfo) {
        dao.saveVipInfo(vipInfo);
    }

    /**
     * @see com.sasis.service.VipInfoManager#removeVipInfo(String id)
     */
    public void removeVipInfo(VipInfo vipInfo) {
        dao.removeVipInfo( vipInfo);
    }
    public PageList queryForPageList(String listStatementId,  
    		Object parameterObject, PageRequest pageRequest){
	return dao.queryForPageList(listStatementId,   parameterObject, pageRequest);
    }
    
    //for ajax get the data from DB
	public VipInfo getVipInfoDwr(String cardNum) {
		// TODO Auto-generated method stub
		return dao.getVipInfoDwr(cardNum);
	}
}
